var api = require('../../utils/api.js');
var app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

    var id=options.id;


    var that=this;
    api.get({
      url: 'wxapp/user/getorderbygid',
      data: {id:id},
      success: data => {
         console.log(data);
         that.setData({
           list:data.data
         })
      }

    });

  },

  
  nexturl(ret){
    console.log(ret);
    var url=ret.currentTarget.dataset.url;

    wx.navigateTo({
      url: url
    })

  }

  
})